#pragma once
#include <cstdint>
#include <unordered_map>
#include "EventEngine.h"

class TestEngine : public xncc::user::EventEngine
{
  public:
    TestEngine();
    ~TestEngine() override = default;
    void init() override;
    void
    handleTestMsg(const char* buf, uint32_t len, xncc::types::thread_id_t tid, xncc::types::connection_id_t connId);
    void handleSendTestMsg(xncc::types::thread_id_t tid, xncc::types::connection_id_t connId);
    void handleConnected(xncc::types::connection_id_t id, xncc::types::thread_id_t tid) override;
    void handleDisconnected(xncc::types::connection_id_t id,
                            xncc::types::thread_id_t     tid,
                            const std::string&           disconnectedReason) override;

  private:
    std::unordered_map<xncc::types::connection_id_t, xncc::types::timer_id_t> timerIds_;
};